CMake: Move project() to top of CMakeLists.txt

Also remove `NOTICE` from message() about PCHs - it seems to print this in the actual message, contrary to the documentation where it is used as a severity.
This commit is contained in:
Ben Clayton 2020-07-13 19:14:02 +01:00
parent f5add0b20d
commit 6b20d83c41

View File

@ -31,6 +31,9 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
project(glslang
LANGUAGES CXX)
# increase to 3.1 once all major distributions
# include a version of CMake >= 3.1
cmake_minimum_required(VERSION 2.8.12)
@ -115,8 +118,6 @@ if(USE_CCACHE)
endif(CCACHE_FOUND)
endif()
project(glslang)
if(ENABLE_CTEST)
include(CTest)
endif()
@ -303,7 +304,7 @@ if(NOT CMAKE_VERSION VERSION_LESS "3.16")
else()
function(glslang_pch target pch)
endfunction()
message(NOTICE "Your CMake version is ${CMAKE_VERSION}. Update to at least 3.16 to enable precompiled headers to speed up incremental builds")
message("Your CMake version is ${CMAKE_VERSION}. Update to at least 3.16 to enable precompiled headers to speed up incremental builds")
endif()
if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External)