Skip to content

Commit 0ae7dd8

Browse files
committed
CMakeLists: hint to set CMAKE_BUILD_TYPE
If single-configuration generator is used, setting Release is a good idea (or Debug explicitly). `gpujpeg_coder_init_image()` is a bit CPU-intensive and is a good idea to toggle host compiler optimizations on.
1 parent cd249d5 commit 0ae7dd8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ if (CMAKE_CUDA_ARCHITECTURES MATCHES OFF)
2323
message(NOTICE "You may want to set CUDA architecture, suggested `-DCMAKE_CUDA_ARCHITECTURES=native`")
2424
endif()
2525

26+
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
27+
message(NOTICE "Suggesting setting build type expicitly (eg. "
28+
"\"-DCMAKE_BUILD_TYPE=Release\" or \"Debug\") for single-config "
29+
"generators.")
30+
endif()
31+
2632
cmake_policy(SET CMP0010 NEW) # error on undefined variable
2733

2834
set(CPACK_PACKAGE_INSTALL_DIRECTORY "gpujpeg") # may be removed when version will be explicitly defined

0 commit comments

Comments
 (0)