Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# Boiler plate -- CTest
include(CTest)
mark_as_advanced(BUILD_TESTING)

#Options
# --enable-extra-debugging
Expand All @@ -33,7 +34,7 @@ option(QMP_BGQ "Enable BlueGene/Q Personality to set native machine geometry" OF
option(QMP_BGSPI "Enable BlueGene SPI" OFF)

# --enable-testing
option(QMP_TESTING "Enable buidling of the examples" ON)
option(QMP_BUILD_TESTS "Enable buidling of the examples" ON)

# Enable Address address and undefined behaviour sanitizers
option(QMP_ENABLE_SANITIZERS "Enable Address and Undefined Behaviour Sanitizers" OFF)
Expand Down Expand Up @@ -98,13 +99,26 @@ if( QMP_ENABLE_SANITIZERS )
message(STATUS "QMP: Setting Sanitizer options: ${QMP_SANITIZER_OPTS}")
endif()

if(QMP_BUILD_TESTS)
set(BUILD_TESTING ON)
endif()

if(QMP_BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON)
endif()

# Configuration file
configure_file(include/qmp_config.h.cmake.in include/qmp_config.h)
configure_file(bin/qmp-config.cmake.in bin/qmp-config @ONLY)


add_subdirectory(lib)
if( QMP_TESTING )
option(QMP_BUILD_SHARED_LIBS "Build shared library (in addition to or instead of static)" OFF)
if(QMP_BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
endif()

add_subdirectory(lib)
if( QMP_BUILD_TESTS )
add_subdirectory(examples)
endif()

Expand Down
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ endif()
install(TARGETS qmp
EXPORT QMPTargets
LIBRARY DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
Expand Down