Skip to content

Commit

Permalink
cmake: Simplify usage of option
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-lunarg committed Oct 31, 2023
1 parent a145252 commit 0b6ebb2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,11 @@ if(ENABLE_SPIRV_TOOLS_INSTALL)
endmacro()
endif()

# Defaults to OFF if the user didn't set it.
option(SPIRV_SKIP_EXECUTABLES
"Skip building the executable and tests along with the library"
${SPIRV_SKIP_EXECUTABLES})
option(SPIRV_SKIP_TESTS
"Skip building tests along with the library" ${SPIRV_SKIP_TESTS})
if ("${SPIRV_SKIP_EXECUTABLES}")
option(SPIRV_SKIP_EXECUTABLES "Skip building the executable and tests along with the library")
if (SPIRV_SKIP_EXECUTABLES)
set(SPIRV_SKIP_TESTS ON)
endif()
option(SPIRV_SKIP_TESTS "Skip building tests along with the library")

# Defaults to ON. The checks can be time consuming.
# Turn off if they take too long.
Expand Down

0 comments on commit 0b6ebb2

Please sign in to comment.