Skip to content

Commit

Permalink
Fix symbol_conflict test on Windows
Browse files Browse the repository at this point in the history
The symbol_conflict test failed on Windows because the CMake build
script accidentally did not include the required code in the loader
during Debug builds. This change fixes the CMake script so that the
code is included in the laoder.
  • Loading branch information
erimatnor authored and RobAtticus committed Sep 10, 2018
1 parent 71589c4 commit 02d2576
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ add_library(${PROJECT_NAME}-loader MODULE ${SOURCES} ${TEST_SOURCES} ${HEADERS})

# Do not compile mock extensions on Windows due to missing exported symbol
# in IsParallelWorker macro
if (CMAKE_BUILD_TYPE MATCHES Debug AND NOT WIN32)
add_subdirectory(../../test/loader-mock/ "${CMAKE_CURRENT_BINARY_DIR}/mock")
if (CMAKE_BUILD_TYPE MATCHES Debug)
if (NOT WIN32)
add_subdirectory(../../test/loader-mock/ "${CMAKE_CURRENT_BINARY_DIR}/mock")
endif (NOT WIN32)

# This define generates extension-specific code for symbol conflict testing
target_compile_definitions(${PROJECT_NAME}-loader PUBLIC MODULE_NAME=loader)
endif (CMAKE_BUILD_TYPE MATCHES Debug AND NOT WIN32)
endif (CMAKE_BUILD_TYPE MATCHES Debug)

set_target_properties(${PROJECT_NAME}-loader PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}
Expand Down

0 comments on commit 02d2576

Please sign in to comment.