turned off -Wshadow for gcc

This commit is contained in:
Erik Frojdh 2019-04-08 09:28:40 +02:00
parent 33f726ff7e
commit fad308754b
2 changed files with 8 additions and 1 deletions

View File

@ -57,7 +57,7 @@ target_compile_options(slsProjectWarnings INTERFACE
-Woverloaded-virtual
-Wdouble-promotion
-Wformat=2
-Wshadow
)
@ -66,6 +66,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.2)
message(FATAL_ERROR "Clang version must be at least 3.2!")
endif()
target_compile_options(slsProjectWarnings INTERFACE -Wshadow) #Clag does not warn on constructor
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
message(FATAL_ERROR "GCC version must be at least 4.8!")

View File

@ -1,11 +1,17 @@
add_subdirectory(pybind11)
pybind11_add_module(_sls_detector src/main.cpp)
target_link_libraries(_sls_detector PUBLIC
slsProjectOptions
slsProjectWarnings
slsDetectorShared
slsReceiverShared
slsSupportLib )
set_target_properties(_sls_detector PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)