[Cmake-commits] [cmake-commits] hoffman committed CMakeLists.txt NONE 1.3.2.2 main.c NONE 1.1.2.2

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Jun 25 09:52:15 EDT 2008


Update of /cvsroot/CMake/CMake/Tests/FindModulesExecuteAll
In directory public:/mounts/ram/cvs-serv13020/Tests/FindModulesExecuteAll

Added Files:
      Tag: CMake-2-6
	CMakeLists.txt main.c 
Log Message:
ENH: merge in changes from main tree


--- NEW FILE: CMakeLists.txt ---
# This file includes all FindXXX.cmake modules, so they are all executed.
# As it is it doesn't test a lot.
# It makes sure that the modules don't contain basic syntax errors.
# It also makes sure that modules don't fail with an error if something
# wasn't found but REQUIRED was not given.
#
# I guess more things could be added, like checking whether variables are
# defined after running the modules (e.g. FOO_FOUND etc.).
project(FindModulesExecuteAll)
cmake_minimum_required(VERSION 2.6)

file(GLOB all_modules "${CMAKE_CURRENT_SOURCE_DIR}/../../Modules/Find*cmake")

foreach(module ${all_modules})
  message(STATUS "module: ${module}")
  include("${module}")

  # get the "basename" of the package, so the existence of variables like
  # FOO_FOUND could be tested later on, Alex
  string(REGEX REPLACE ".+Find([^\\.]+)\\.cmake" "\\1" packageName "${module}")
  string(TOUPPER "${packageName}" packageNameUpper)

# disabled for now, since too many modules break:
#  if(NOT DEFINED ${packageNameUpper}_FOUND)
#    message(SEND_ERROR "${packageNameUpper}_FOUND not defined !")
#  endif(NOT DEFINED ${packageNameUpper}_FOUND)

endforeach(module ${all_modules})

add_executable(FindModulesExecuteAll main.c)

--- NEW FILE: main.c ---
int main()
{
   return 0;
}



More information about the Cmake-commits mailing list