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.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 29b39fb..fd9335e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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 @@
endif(CCACHE_FOUND)
endif()
-project(glslang)
-
if(ENABLE_CTEST)
include(CTest)
endif()
@@ -303,7 +304,7 @@
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)