Commit 420085b6 authored by Simon Spannagel's avatar Simon Spannagel Committed by Jens Kroeger
Browse files

Fix typo in CMake variable name

parent c0a41186
......@@ -7,7 +7,7 @@ FOREACH( FLAG ${COMPILER_FLAGS} )
CHECK_CXX_COMPILER_FLAG( "${FLAG}" CXX_FLAG_WORKS_${FLAG_WORD} )
IF( ${CXX_FLAG_WORKS_${FLAG_WORD}} )
SET ( CMAKE_CXX_FLAGS "${FLAG} ${CMAKE_CXX_FLAGS}")
LIST(APPEND CORRYVRECKAN_CXX_FLAGS ${FLAG})
ELSE()
MESSAGE ( STATUS "NOT adding ${FLAG} to CXX_FLAGS - unsupported flag" )
ENDIF()
......@@ -15,7 +15,7 @@ ENDFOREACH()
# Find threading provider and enable it (NOTE: not used yet)
IF( THREADS_HAVE_PTHREAD_ARG )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
LIST(APPEND CORRYVRECKAN_CXX_FLAGS "-pthread")
SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread")
ELSEIF( CMAKE_THREAD_LIBS_INIT )
SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
......@@ -31,7 +31,7 @@ ENDIF()
# Reduce Wstrict-overflow level for some GCC versions due to false positives:
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wstrict-overflow=2")
ENDIF()
IF(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
LIST(APPEND CORRYVRECKAN_CXX_FLAGS "-Wstrict-overflow=2")
ENDIF()
ENDIF()
......@@ -55,6 +55,7 @@ Create the header or provide the alternative class name as first argument")
# Set the special header flags and add the special dynamic implementation file
TARGET_COMPILE_DEFINITIONS(${${name}} PRIVATE CORRYVRECKAN_MODULE_NAME=${_corryvreckan_module_class})
TARGET_COMPILE_DEFINITIONS(${${name}} PRIVATE CORRYVRECKAN_MODULE_HEADER="${_corryvreckan_module_class}.h")
TARGET_COMPILE_OPTIONS(${${name}} PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
TARGET_SOURCES(${${name}} PRIVATE "${PROJECT_SOURCE_DIR}/src/core/module/dynamic_module_impl.cpp")
SET_PROPERTY(SOURCE "${PROJECT_SOURCE_DIR}/src/core/module/dynamic_module_impl.cpp" APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${_corryvreckan_module_class}.h")
......
......@@ -25,6 +25,8 @@ TARGET_LINK_LIBRARIES(CorryvreckanCore ${CORRYVRECKAN_LIBRARIES})
# Define compile-time library extension
TARGET_COMPILE_DEFINITIONS(CorryvreckanCore PRIVATE SHARED_LIBRARY_SUFFIX="${CMAKE_SHARED_LIBRARY_SUFFIX}")
TARGET_COMPILE_OPTIONS(CorryvreckanCore PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
# Link the DL libraries
TARGET_LINK_LIBRARIES(CorryvreckanCore ${CMAKE_DL_LIBS})
......
......@@ -9,6 +9,7 @@ TARGET_LINK_LIBRARIES(corry ${CORRYVRECKAN_LIBRARIES})
# NOTE: fixes both the RPATH problem as well as the TLS problems
# FIXME: should be removed when we have a better solution
TARGET_LINK_LIBRARIES(corry ${CORRYVRECKAN_MODULE_LIBRARIES})
TARGET_COMPILE_OPTIONS(corry PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
# set install location
INSTALL(TARGETS corry EXPORT corry_install
......
......@@ -60,6 +60,7 @@ ADD_LIBRARY(CorryvreckanObjects SHARED
# Link the standard dependencies
TARGET_LINK_LIBRARIES(CorryvreckanObjects ${CORRYVRECKAN_DEPS_LIBRARIES})
TARGET_COMPILE_OPTIONS(CorryvreckanObjects PRIVATE ${CORRYVRECKAN_CXX_FLAGS})
# Specify install for the messages
INSTALL(TARGETS CorryvreckanObjects
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment