Skip to content

Commit

Permalink
add NOMINMAX define for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Feb 6, 2024
1 parent 3bc2234 commit 9edb6c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function(add_opencl_layer)
target_compile_definitions(${OPENCL_LAYER_TARGET} PRIVATE CL_USE_DEPRECATED_OPENCL_2_2_APIS)

if (WIN32)
target_compile_definitions(${OPENCL_LAYER_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS)
target_compile_definitions(${OPENCL_LAYER_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS NOMINMAX)
endif()

set_target_properties(${OPENCL_LAYER_TARGET} PROPERTIES FOLDER "Layers/${OPENCL_LAYER_CATEGORY}/${OPENCL_LAYER_NUMBER}_${OPENCL_LAYER_TARGET}")
Expand Down
2 changes: 1 addition & 1 deletion samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function(add_opencl_sample)
target_compile_definitions(${OPENCL_SAMPLE_TARGET} PRIVATE CL_HPP_ENABLE_EXCEPTIONS)
endif()
if (WIN32)
target_compile_definitions(${OPENCL_SAMPLE_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS)
target_compile_definitions(${OPENCL_SAMPLE_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS NOMINMAX)
endif()

set_target_properties(${OPENCL_SAMPLE_TARGET} PROPERTIES FOLDER "Samples/${OPENCL_SAMPLE_CATEGORY}/${OPENCL_SAMPLE_NUMBER}_${OPENCL_SAMPLE_TARGET}")
Expand Down
2 changes: 1 addition & 1 deletion tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function(add_opencl_tutorial)
target_compile_definitions(${OPENCL_TUTORIAL_TARGET} PRIVATE CL_HPP_TARGET_OPENCL_VERSION=${OPENCL_TUTORIAL_VERSION})
target_compile_definitions(${OPENCL_TUTORIAL_TARGET} PRIVATE CL_HPP_MINIMUM_OPENCL_VERSION=${OPENCL_TUTORIAL_VERSION})
if (WIN32)
target_compile_definitions(${OPENCL_TUTORIAL_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS)
target_compile_definitions(${OPENCL_TUTORIAL_TARGET} PRIVATE _CRT_SECURE_NO_WARNINGS NOMINMAX)
endif()

set_target_properties(${OPENCL_TUTORIAL_TARGET} PROPERTIES FOLDER "Tutorials/${OPENCL_TUTORIAL_CATEGORY}/${OPENCL_TUTORIAL_TARGET}")
Expand Down

0 comments on commit 9edb6c0

Please sign in to comment.