Skip to content

Commit

Permalink
Pass MP as comp arg
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed May 20, 2024
1 parent 15166f8 commit 7820893
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,31 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.13)

project(${TARGET_NAME})

set( CMAKE_VERBOSE_MAKEFILE on )
add_library(${TARGET_NAME} SHARED
${ALL_SRC}
)
set(CMAKE_VERBOSE_MAKEFILE on)

if (MSVC)
target_compile_options(${TARGET_NAME} PRIVATE "/MP")
else()
target_compile_options(${TARGET_NAME} PRIVATE ${ALL_COMP_ARGS})
endif()
add_library(${TARGET_NAME} SHARED ${ALL_SRC})

target_compile_options(${TARGET_NAME} PRIVATE ${ALL_COMP_ARGS})

set_target_properties(${TARGET_NAME} PROPERTIES SUFFIX ${SHARED_SUFFIX})

target_compile_features(${TARGET_NAME} PRIVATE cxx_std_17)

set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")

target_include_directories(${TARGET_NAME} PUBLIC
${ALL_INC_DIR}
)
target_include_directories(${TARGET_NAME} PUBLIC ${ALL_INC_DIR})

target_link_directories(${TARGET_NAME} PUBLIC
${ALL_LIB_DIR}
)
target_link_directories(${TARGET_NAME} PUBLIC ${ALL_LIB_DIR})


if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
endif()

target_link_libraries(${TARGET_NAME}
${ALL_LIB}
${ALL_EXT_LINK}
)

target_compile_definitions(${TARGET_NAME} PUBLIC
${ALL_DEF}
)
target_compile_definitions(${TARGET_NAME} PUBLIC ${ALL_DEF})

0 comments on commit 7820893

Please sign in to comment.