Merge topic 'fix-export-header-test'

326ad994 Tests: fix GenerateExportHeader directory definitions
This commit is contained in:
Brad King 2016-02-16 09:52:28 -05:00 committed by CMake Topic Stage
commit c92547e88c
2 changed files with 6 additions and 9 deletions

View File

@ -124,6 +124,6 @@ endif()
message("#### Testing reference: ${_platform}")
target_compile_definitions(GenerateExportHeader
PRIVATE
"SRC_DIR=${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}"
"BIN_DIR=${CMAKE_CURRENT_BINARY_DIR}"
"SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/reference/${_platform}\""
"BIN_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\""
)

View File

@ -136,13 +136,10 @@ int main()
libstatic_not_exported();
libstatic_excluded();
#define STRINGIFY_IMPL(A) #A
#define STRINGIFY(A) STRINGIFY_IMPL(A)
compare(STRINGIFY(SRC_DIR) "/libshared_export.h",
STRINGIFY(BIN_DIR) "/libshared/libshared_export.h");
compare(STRINGIFY(SRC_DIR) "/libstatic_export.h",
STRINGIFY(BIN_DIR) "/libstatic/libstatic_export.h");
compare(SRC_DIR "/libshared_export.h",
BIN_DIR "/libshared/libshared_export.h");
compare(SRC_DIR "/libstatic_export.h",
BIN_DIR "/libstatic/libstatic_export.h");
return 0;
}