message(STATUS "Binary output path: ${EXECUTABLE_OUTPUT_PATH}")
if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "Default build type to Debug" FORCE)
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "Default build type to Debug" FORCE)
endif()
- if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -fno-strict-aliasing")
- if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16")
- set(LIB_SUFFIX "64")
- endif()
- if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0")
- # gcc 4.8 - 6: disable noise -Wunused-local-typedefs
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
- endif()
+ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -fno-strict-aliasing")
+ if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16")
+ set(LIB_SUFFIX "64")
+ endif()
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0")
+ # gcc 4.8 - 6: disable noise -Wunused-local-typedefs
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
+ endif()
endif()
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdocumentation")
+endif()
+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
message("Build type -- ${CMAKE_BUILD_TYPE}")
set(LIBRARIES_COMPONENT lib)
set(HEADERS_COMPONENT devel)
-set(SOURCES src/hp_gc.cpp
- src/init.cpp
- src/dhp_gc.cpp
- src/urcu_gp.cpp
- src/urcu_sh.cpp
- src/michael_heap.cpp
- src/topology_hpux.cpp
- src/topology_linux.cpp
- src/topology_osx.cpp
- src/dllmain.cpp)
+set(SOURCES src/init.cpp
+ src/hp.cpp
+ src/dhp.cpp
+ src/urcu_gp.cpp
+ src/urcu_sh.cpp
+ src/thread_data.cpp
+ src/topology_hpux.cpp
+ src/topology_linux.cpp
+ src/topology_osx.cpp
+ src/dllmain.cpp)
add_library(${CDS_SHARED_LIBRARY} SHARED ${SOURCES})
- set_target_properties( ${CDS_SHARED_LIBRARY} PROPERTIES VERSION ${PROJECT_VERSION}
- DEBUG_POSTFIX "_d")
+ set_target_properties(${CDS_SHARED_LIBRARY} PROPERTIES VERSION ${PROJECT_VERSION}
+ DEBUG_POSTFIX "_d")
add_library(${CDS_STATIC_LIBRARY} STATIC ${SOURCES})
set_target_properties(${CDS_STATIC_LIBRARY} PROPERTIES DEBUG_POSTFIX "_d")
target_link_libraries(${CDS_SHARED_LIBRARY} PRIVATE ${CMAKE_THREAD_LIBS_INIT})