Skip to content
Closed
Changes from 5 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
23 changes: 10 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
endif()
if(CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "KokkosTools requires C++17")
message(FATAL_ERROR "KokkosTools requires C++17 or higher")
endif()


Expand All @@ -25,20 +25,19 @@ endif()
list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake)

message(STATUS)
message(STATUS Configuring Kokkos-Tools)
message(STATUS "Configuring Kokkos-Tools")
message(STATUS)

# Common settings
set(BUILD_SHARED_LIBS "Build shared libraries" ON)
if(WIN32)
set(BUILD_SHARED_LIBS OFF) # We need to add __declspec(dllexport/dllimport) for Windows DLLs
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really an option. The tools will only work as shared libs.

# We need to add __declspec(dllexport/dllimport) for Windows DLLs
if(WIN32 AND BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF)
message(STATUS "Windows building of .dlls is not yet supported")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should error out

endif()

# Tools settings
option(KokkosTools_ENABLE_SINGLE "Build single library interfacing all profilers and dispatching at runtime" OFF)
if(WIN32)
set(KokkosTools_ENABLE_SINGLE ON)
endif()
option(KokkosTools_ENABLE_SINGLE "Build single library interfacing all profilers and dispatching at runtime" ${WIN32})

option(KokkosTools_ENABLE_PAPI "Enable PAPI support" OFF)
option(KokkosTools_ENABLE_MPI "Enable MPI support" OFF)
Expand Down Expand Up @@ -119,11 +118,9 @@ endif()
# make Kokkos profiling interface available for native profilers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/profiling/all)

set(COMMON_HEADERS_PATH ${CMAKE_CURRENT_BINARY_DIR}/common)
include_directories(${COMMON_HEADERS_PATH})

Comment on lines -109 to -111
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete these?

# Allow all tools to include any file.
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common)
set(COMMON_HEADERS_PATH ${CMAKE_CURRENT_BINARY_DIR}/common) # Used in profilers/all

set(SINGLELIB_PROFILERS "" CACHE STRING "" FORCE)

Expand All @@ -139,7 +136,7 @@ if(WIN32)
endif()

if(APPLE)
message(STATUS "Apple OSX target detected.")
message(STATUS "Apple OSX target detected - skipping Linux-only tools.")
endif()

# Utilities
Expand Down