Parcourir la source

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.
Ben Clayton il y a 5 ans
Parent
commit
6b20d83c41
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      CMakeLists.txt

+ 4 - 3
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 @@ 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)