CMakeLists.txt 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. #
  2. # A more complex test case
  3. #
  4. cmake_minimum_required(VERSION 2.4)
  5. cmake_policy(SET CMP0054 NEW)
  6. project (Complex)
  7. # Test that renaming a built-in works when configured multiple times.
  8. message("message")
  9. function(message)
  10. _message(${ARGN})
  11. endfunction()
  12. message("message")
  13. # Try setting a new policy. The IF test is for coverage.
  14. if(POLICY CMP0003)
  15. cmake_policy(SET CMP0003 NEW)
  16. cmake_policy(GET CMP0003 P3)
  17. if(NOT "${P3}" STREQUAL "NEW")
  18. message(FATAL_ERROR "cmake_policy(GET) did not report NEW!")
  19. endif()
  20. endif()
  21. # It is not recommended to set a policy to OLD, but this test
  22. # covers the OLD behavior of some policies.
  23. foreach(p
  24. CMP0029
  25. CMP0032
  26. CMP0033
  27. CMP0034
  28. CMP0043
  29. CMP0050
  30. )
  31. if(POLICY ${p})
  32. cmake_policy(SET ${p} OLD)
  33. endif()
  34. endforeach()
  35. # Test building without per-rule echo lines in Makefiles.
  36. set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
  37. set(CPACK_SOURCE_IGNORE_FILES "~$;^C:/hoffman/My Builds/testcase.*/CVS/;^C:/hoffman/My Builds/testcase.*/\\.svn/;^C:/hoffman/My Builds/testcase.*/sweigart/;^C:/hoffman/My Builds/testcase/www/eospaper/solution/eos2001/;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_tables_new/;^C:/hoffman/My Builds/testcase/COPYING$;^C:/hoffman/My Builds/testcase/INSTALL$;^C:/hoffman/My Builds/testcase/Makefile$;^C:/hoffman/My Builds/testcase/Makefile\\.in$;^C:/hoffman/My Builds/testcase/.*\\.lo$;^C:/hoffman/My Builds/testcase/.*\\.la$;^C:/hoffman/My Builds/testcase/mkinstalldirs$;^C:/hoffman/My Builds/testcase/missing$;^C:/hoffman/My Builds/testcase/ltmain\\.sh$;^C:/hoffman/My Builds/testcase/libtool$;^C:/hoffman/My Builds/testcase/install-sh$;^C:/hoffman/My Builds/testcase/configure$;^C:/hoffman/My Builds/testcase/config\\.sub$;^C:/hoffman/My Builds/testcase/config\\.status$;^C:/hoffman/My Builds/testcase/config\\.log$;^C:/hoffman/My Builds/testcase/config\\.guess$;^C:/hoffman/My Builds/testcase/autom4te\\.cache$;^C:/hoffman/My Builds/testcase/aclocal\\.m4$;^C:/hoffman/My Builds/testcase/depcomp$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.075\\.model_cassisi_eos1_10$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.075\\.model_cassisi_eos1_10_corr$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.1\\.model_cassisi_eos1$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.1\\.model_cassisi_scvh$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.1\\.modelc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.3\\.modelc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/1\\.0\\.modelc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/1\\.0\\.rgbtip\\.modelc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/1\\.0\\.zahb\\.modelc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.1\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/1\\.0\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.3\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/0\\.085\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/.*\\.ps$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange\\.mem$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange\\.log$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange\\.dvi$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange\\.tex\\.bak$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/head\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/body\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/prior-dvi\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j10\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j12\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j16\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j20\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j22\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j26\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j30\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j32\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/j36\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k10\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k12\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k20\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k22\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k30\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/k32\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/1_exchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/1_exchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/2_exchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/2_exchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/linear_exchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/linear_exchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/noexchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/noexchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/nr_exchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/nr_exchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/series_exchange_dgamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/series_exchange_dlnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_JNR_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_Jseries_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_KNR_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_Kseries_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check34_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check35_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check36_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check43_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check44_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check45_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check46_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check47_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check48_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/tc_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/.*\\.pyc$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/context\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/make\\.out.*$;^C:/hoffman/My Builds/testcase/www/Makefile$;^C:/hoffman/My Builds/testcase/www/Makefile\\.in$;^C:/hoffman/My Builds/testcase/src/.*\\.flc$;^C:/hoffman/My Builds/testcase/src/Makefile$;^C:/hoffman/My Builds/testcase/src/Makefile\\.in$;^C:/hoffman/My Builds/testcase/src/\\.deps$;^C:/hoffman/My Builds/testcase/src/\\.libs$;^C:/hoffman/My Builds/testcase/src/.*\\.la$;^C:/hoffman/My Builds/testcase/src/.*\\.lo$;^C:/hoffman/My Builds/testcase/src/make\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/statef.*\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.1\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.1\\.model_13$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.1\\.model_23$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.3\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.3\\.model_13$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/0\\.3\\.model_23$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/1\\.0\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/1\\.0\\.model_13$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/1\\.0\\.model_15$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/1\\.0\\.model_23$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/1\\.0\\.model_rel$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/hot_post_agb\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/rgb_tip\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/rgbtip\\.1\\.0\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/rgbtip\\.1\\.0\\.model_13$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/rgbtip\\.1\\.0\\.model_23$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/start_shellflash\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/white_dwarf\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/zahb\\.1\\.0\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/zahb\\.1\\.0\\.model_13$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/zahb\\.1\\.0\\.model_23$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/model-loci/zahb\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dh/dgamma1$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dh/dlnp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dh/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fermi_dirac_approx/15gamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fermi_dirac_approx/15lnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fermi_dirac_approx/23gamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fermi_dirac_approx/23lnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/thermodynamic_consistency/.*\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/thermodynamic_consistency/.*\\.results$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/pteh/dgamma1$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/pteh/dlnp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/pteh/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/newversion_grid/.*\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/newversion_grid/.*\\.err$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/.*\\.ps$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/.*\\.pyc$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_fit\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_fit\\.dvi$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_fit\\.log$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/body\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/head\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/prior-dvi\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/3order_data\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/5order_data\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/8order_data\\.tex$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check8_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check1_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check3_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check5_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/effo_check3_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/effoo_check3_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fda15gamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fda15lnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fda23gamma1\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/fda23lnp\\.yplot$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/tc_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/make\\.out.*$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/thermodynamic_consistency/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/thermodynamic_consistency/tc\\.results$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/opal_compare_model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/opal_compare_solar\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/opal_solar\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/opal_solar_1995\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/statef_opal_model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/opal_solar/statef_opal_model_1995\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/purehe_newversion_grid/.*\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/purehe_newversion_grid/.*\\.err$;^C:/hoffman/My Builds/testcase/include/Makefile\\.in$;^C:/hoffman/My Builds/testcase/include/Makefile$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/0\\.1\\.model_pteh$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/1\\.0\\.model_eos1a-eos1$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/1\\.0\\.model_pteh$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/statef_model_0\\.1\\.model_pteh\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/statef_model_1\\.0\\.model_eos1a-eos1\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/model-loci/statef_model_1\\.0\\.model_pteh\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/context/contour\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/context/eos_grid\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/context/statef_grid\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/thermodynamic_consistency/fort\\.91$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/thermodynamic_consistency/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/nocoulomb/dgamma1$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/nocoulomb/dlnp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/nocoulomb/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/context$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/oldversion_grid$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/2005Ap&SS\\.298\\.\\.135S\\.pdf$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/2007Ap&SS\\.307\\.\\.263C\\.pdf$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/astro-ph\\.9909168_eprint_submitted_to_High_Press\\.Res\\.16,331\\.pdf$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/.*ps.*$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/.*\\.pyc$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/convergence\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/convergence\\.dvi$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/convergence\\.log$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/body\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/head\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/prior-dvi\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/statef_grid-newversion$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/context\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/pureh_context\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/purehe_context\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/old$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/make\\.out.*$;^C:/hoffman/My Builds/testcase/utils/.*\\.flc$;^C:/hoffman/My Builds/testcase/utils/Makefile$;^C:/hoffman/My Builds/testcase/utils/Makefile\\.in$;^C:/hoffman/My Builds/testcase/utils/\\.deps$;^C:/hoffman/My Builds/testcase/utils/\\.libs$;^C:/hoffman/My Builds/testcase/utils/.*\\.la$;^C:/hoffman/My Builds/testcase/utils/.*\\.lo$;^C:/hoffman/My Builds/testcase/utils/free_eos_test$;^C:/hoffman/My Builds/testcase/utils/test_rosenbrock$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/eff_check1\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/eff_check3\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/eff_check5\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/eff_check8\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/eff_checknr\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/effo_check3\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/eff_check/effoo_check3\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence_20070613$;^C:/hoffman/My Builds/testcase/www/eospaper/text$;^C:/hoffman/My Builds/testcase/www/eospaper/cassisi_book_fig$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.1\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/2\\.0\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.2\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.3\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.4\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.5\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/1\\.6\\.0$;^C:/hoffman/My Builds/testcase/www/eospaper/figures$;^C:/hoffman/My Builds/testcase/www/eospaper/old$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/.*\\.ps.*$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/coulomb\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/coulomb\\.dvi$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/coulomb\\.log$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/.*\\.pyc$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/body\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/head\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/prior-dvi\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/context\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dh_dgamma1_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dh_dlnp_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dhtau_dgamma1_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dhtau_dlnp_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/nocoulomb_dgamma1_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/nocoulomb_dlnp_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/pteh_dgamma1_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/pteh_dlnp_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/make\\.out.*$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_JNR\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_Jseries\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_KNR\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_Kseries\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check34\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check35\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check36\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check44\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check45\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/exchange_check46\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_1_exchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_2_exchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_linear_exchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_noexchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_nr_exchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/statef_compare_series_exchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/1_exchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/noexchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/nr_exchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/series_exchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/series_exchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/linear_exchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/2_exchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/nr_exchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/linear_exchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/noexchange_dgamma1\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/1_exchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/exchange_check/2_exchange_dlnp\\.gnuplot$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/pureh_newversion_grid/.*\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/convergence/pureh_newversion_grid/.*\\.err$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dhtau/dgamma1$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dhtau/dlnp$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/dhtau/statef_compare\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_0\\.1\\.model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_0\\.3\\.model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.model_linear\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.model_noexchange\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.model_nr\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.rgbtip\\.model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/statef_model_1\\.0\\.zahb\\.model\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.zahb\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.rgbtip\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.model_linear$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.model_noexchange$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.model_nr$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/0\\.1\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/1\\.0\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/model-loci/0\\.3\\.model$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/context/contour\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/context/eos_grid\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/exchange/context/statef_grid\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/gong/delta\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/gong/m0085eos1gong\\.ascii$;^C:/hoffman/My Builds/testcase/www/eospaper/eff_fit/rho-T-loci/gong/m0085eos2gong\\.ascii$;^C:/hoffman/My Builds/testcase/www/eospaper/coulomb/coulomb_adjust/coulomb_adjust\\.out$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/.*\\.ps$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/.*\\.pyc$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/head\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/body\\.tmp$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/prior-dvi\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/solution\\.aux$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/solution\\.log$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/solution\\.dvi$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/rtc_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/tc_yplot\\.in$;^C:/hoffman/My Builds/testcase/www/eospaper/solution/make\\.out.*$")
  38. #
  39. # Define a macro
  40. #
  41. macro(ASSERT value msg)
  42. if (NOT ${value})
  43. message ("Assertion failure:" ${msg} )
  44. endif ()
  45. endmacro()
  46. # invoke the macro
  47. ASSERT(Complex_BINARY_DIR "The PROJECT command is broken")
  48. #
  49. # Define a var args macro, it must take two or four args
  50. #
  51. macro(TEST_ARGC value1 value2)
  52. add_definitions(${value1} ${value2})
  53. if (${ARGC} EQUAL 4)
  54. add_definitions(${ARGV2} ${ARGV3})
  55. endif ()
  56. endmacro()
  57. # invoke the macro
  58. TEST_ARGC(-DCMAKE_ARGV1 -DCMAKE_ARGV2 -DCMAKE_ARGV3 -DCMAKE_ARGV4)
  59. macro(TEST_VAR_ARG fa)
  60. if("${ARGV}" STREQUAL "1;2;3")
  61. message(STATUS "ARGV works")
  62. else()
  63. message(FATAL_ERROR "ARGV does not work; got \"${ARGV}\" instead of \"1;2;3\"")
  64. endif()
  65. if("${ARGN}" STREQUAL "2;3")
  66. message(STATUS "ARGN works")
  67. else()
  68. message(FATAL_ERROR "ARGV does not work; got \"${ARGN}\" instead of \"2;3\"")
  69. endif()
  70. endmacro()
  71. TEST_VAR_ARG(1 2 3)
  72. # Floating-point comparison test.
  73. if(2.4 LESS 2.4)
  74. message(FATAL_ERROR "Failed: 2.4 LESS 2.4")
  75. endif()
  76. if(2.4 GREATER 2.4)
  77. message(FATAL_ERROR "Failed: 2.4 GREATER 2.4")
  78. endif()
  79. if(NOT 2.4 EQUAL 2.4)
  80. message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
  81. endif()
  82. if(NOT 2.4 LESS_EQUAL 2.4)
  83. message(FATAL_ERROR "Failed: NOT 2.4 LESS_EQUAL 2.4")
  84. endif()
  85. if(NOT 2.4 GREATER_EQUAL 2.4)
  86. message(FATAL_ERROR "Failed: NOT 2.4 GREATER_EQUAL 2.4")
  87. endif()
  88. if(CMAKE_SYSTEM MATCHES "OSF1-V")
  89. if(NOT CMAKE_COMPILER_IS_GNUCXX)
  90. string(APPEND CMAKE_CXX_FLAGS " -timplicit_local -no_implicit_include ")
  91. endif()
  92. endif()
  93. add_definitions(-DCMAKE_IS_FUN)
  94. add_definitions(-DCMAKE_IS_REALLY_FUN)
  95. set_property(DIRECTORY
  96. PROPERTY COMPILE_DEFINITIONS_RELEASE
  97. CMAKE_IS_FUN_IN_RELEASE_MODE
  98. )
  99. set_property(DIRECTORY
  100. PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO
  101. CMAKE_IS_FUN_IN_RELEASE_MODE
  102. )
  103. set_property(DIRECTORY
  104. PROPERTY COMPILE_DEFINITIONS_MINSIZEREL
  105. CMAKE_IS_FUN_IN_RELEASE_MODE
  106. )
  107. set(TEST_SEP "a b c")
  108. separate_arguments(TEST_SEP)
  109. #
  110. # Include vars from a file and from a cache
  111. #
  112. if (EXISTS ${Complex_SOURCE_DIR}/VarTests.cmake)
  113. include(${Complex_SOURCE_DIR}/VarTests.cmake)
  114. endif ()
  115. include(fileshouldnotbehere OPTIONAL)
  116. load_cache(${Complex_SOURCE_DIR}/Cache
  117. EXCLUDE
  118. CACHE_TEST_VAR_EXCLUDED
  119. INCLUDE_INTERNALS
  120. CACHE_TEST_VAR_INTERNAL)
  121. load_cache(${Complex_SOURCE_DIR}/Cache READ_WITH_PREFIX foo CACHE_TEST_VAR2)
  122. if(${fooCACHE_TEST_VAR2} MATCHES bar)
  123. message("Load cache worked: ${fooCACHE_TEST_VAR2}")
  124. else()
  125. message(FATAL_ERROR "Load cache with prefix failed: ${fooCACHE_TEST_VAR2}")
  126. endif()
  127. #
  128. # Specify include and lib dirs
  129. # (BEFORE is for coverage)
  130. #
  131. include_directories(
  132. Library
  133. )
  134. include_directories(BEFORE
  135. ${Complex_BINARY_DIR}
  136. )
  137. include_directories(SYSTEM Library/SystemDir)
  138. include_regular_expression("^(cmTest|file|sharedFile|test).*$" "^cmMissing")
  139. link_directories(
  140. ${Complex_BINARY_DIR}/Library
  141. )
  142. #
  143. # check for SET CACHE FORCE
  144. #
  145. set(FORCE_TEST 1 CACHE STRING "a test")
  146. set(FORCE_TEST 0 CACHE STRING "a test" FORCE)
  147. #
  148. # Lib and exe path
  149. #
  150. set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib/static")
  151. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/lib")
  152. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${Complex_BINARY_DIR}/bin")
  153. message (Test " " escape " " semi-colon " " \; \;)
  154. #
  155. # Exec program (TODO: test a result)
  156. # Increase coverage.
  157. #
  158. message("\nIgnore this message")
  159. option(NO_EXEC_PROGRAM "Do not test EXEC_PROGRAM" 0)
  160. if (NOT NO_EXEC_PROGRAM)
  161. exec_program(${CMAKE_COMMAND} ARGS -E echo NO_EXEC_PROGRAM "${Complex_BINARY_DIR}")
  162. else ()
  163. message("Set this option ON")
  164. endif ()
  165. mark_as_advanced(NO_EXEC_PROGRAM)
  166. mark_as_advanced(CLEAR NO_EXEC_PROGRAM)
  167. # Execute a process. Add coverage for this command.
  168. execute_process(
  169. COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
  170. OUTPUT_VARIABLE TEST_OUT
  171. )
  172. if("${TEST_OUT}" STREQUAL "ABCDEFG\n")
  173. else()
  174. message(SEND_ERROR "EXECUTE_PROCESS output test failed: [${TEST_OUT}]")
  175. endif()
  176. # This test has some problems on UNIX systems. Disabling for now.
  177. #
  178. # execute_process(
  179. # COMMAND ${CMAKE_COMMAND} -E echo "ABCDEFG"
  180. # COMMAND /process/does/not/exist
  181. # OUTPUT_QUIET
  182. # ERROR_QUIET
  183. # RESULT_VARIABLE RESULT
  184. # )
  185. # if("${RESULT}" STREQUAL "0")
  186. # message(SEND_ERROR
  187. # "EXECUTE_PROCESS result test failed with RESULT=[${RESULT}]")
  188. # else()
  189. # message(STATUS "EXECUTE_PROCESS result test passed with RESULT=[${RESULT}]")
  190. # endif()
  191. #
  192. # Create directory.
  193. # The 'complex' executable will then test if this dir exists,
  194. # sadly it won't be able to remove it.
  195. #
  196. make_directory("${Complex_BINARY_DIR}/make_dir")
  197. #
  198. # Test FIND_LIBARY
  199. # Create a dummy empty lib
  200. #
  201. configure_file(
  202. ${Complex_SOURCE_DIR}/Library/dummy
  203. ${Complex_BINARY_DIR}/Library/dummylib.lib
  204. COPYONLY)
  205. foreach (ext ${CMAKE_SHLIB_SUFFIX};.so;.a;.sl
  206. ${CMAKE_SHARED_LIBRARY_SUFFIX}.2
  207. ${CMAKE_STATIC_LIBRARY_SUFFIX}.2)
  208. configure_file(
  209. ${Complex_SOURCE_DIR}/Library/dummy
  210. ${Complex_BINARY_DIR}/Library/libdummylib${ext}
  211. COPYONLY)
  212. endforeach ()
  213. find_library(FIND_DUMMY_LIB
  214. dummylib
  215. PATHS
  216. ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
  217. find_library(FIND_DUMMY_LIB
  218. NAMES dummylib dummylib2
  219. PATHS
  220. ${Complex_BINARY_DIR}/Library DOC "find dummy lib")
  221. # This doesn't work for platforms that have a shared library and an import
  222. # library, like Windows with .dll and .lib. Limit is to ".so" now because it's
  223. # known to work there.
  224. if(CMAKE_SHARED_LIBRARY_SUFFIX STREQUAL ".so")
  225. find_library(FIND_DUMMY_SHLIB_VERSIONED
  226. NAMES libdummylib${CMAKE_SHARED_LIBRARY_SUFFIX}.2
  227. PATHS ${Complex_BINARY_DIR}/Library
  228. DOC "find versioned dummy shared lib"
  229. NO_DEFAULT_PATH)
  230. if(NOT FIND_DUMMY_SHLIB_VERSIONED MATCHES "/libdummylib${CMAKE_SHARED_LIBRARY_SUFFIX}.2")
  231. message(SEND_ERROR "FIND_DUMMY_SHLIB_VERSIONED is not set correctly: "
  232. "${FIND_DUMMY_SHLIB_VERSIONED}")
  233. endif()
  234. endif()
  235. # Static library, should work everywhere
  236. find_library(FIND_DUMMY_STLIB_VERSIONED
  237. NAMES libdummylib${CMAKE_STATIC_LIBRARY_SUFFIX}.2
  238. PATHS ${Complex_BINARY_DIR}/Library
  239. DOC "find versioned dummy static lib"
  240. NO_DEFAULT_PATH)
  241. if(NOT FIND_DUMMY_STLIB_VERSIONED MATCHES "/libdummylib${CMAKE_STATIC_LIBRARY_SUFFIX}.2")
  242. message(SEND_ERROR "FIND_DUMMY_STLIB_VERSIONED is not set correctly: "
  243. "${FIND_DUMMY_STLIB_VERSIONED}")
  244. endif()
  245. #
  246. # Test SET_SOURCE_FILES_PROPERTIES
  247. #
  248. set_source_files_properties(nonexisting_file2
  249. GENERATED
  250. ABSTRACT
  251. WRAP_EXCLUDE
  252. COMPILE_FLAGS "-foo -bar")
  253. get_source_file_property(FILE_HAS_ABSTRACT nonexisting_file2 ABSTRACT)
  254. get_source_file_property(FILE_HAS_WRAP_EXCLUDE nonexisting_file2 WRAP_EXCLUDE)
  255. get_source_file_property(FILE_COMPILE_FLAGS nonexisting_file2 COMPILE_FLAGS)
  256. set_source_files_properties(nonexisting_file3 PROPERTIES
  257. GENERATED 1
  258. ABSTRACT 1
  259. WRAP_EXCLUDE 1
  260. COMPILE_FLAGS "-foo -bar")
  261. get_source_file_property(FILE_HAS_ABSTRACT nonexisting_file3 ABSTRACT)
  262. get_source_file_property(FILE_HAS_WRAP_EXCLUDE nonexisting_file3 WRAP_EXCLUDE)
  263. get_source_file_property(FILE_COMPILE_FLAGS nonexisting_file3 COMPILE_FLAGS)
  264. #
  265. # Test registry (win32)
  266. # Create a file, put its path in a registry key, try to find the file in that
  267. # path using that registry key, then remove the file and the key
  268. #
  269. if (WIN32)
  270. if (NOT UNIX)
  271. set(dir "${Complex_BINARY_DIR}/registry_dir")
  272. set(file "registry_test_dummy")
  273. set(hkey "HKEY_CURRENT_USER\\Software\\Kitware\\CMake\\Tests\\Complex;registry_test")
  274. configure_file(
  275. ${Complex_SOURCE_DIR}/Library/dummy
  276. "${dir}/${file}"
  277. COPYONLY)
  278. exec_program(${CMAKE_COMMAND} ARGS "-E write_regv \"${hkey}\" \"${dir}\"")
  279. find_path(REGISTRY_TEST_PATH
  280. ${file}
  281. "[${hkey}]" DOC "Registry_Test_Path")
  282. exec_program(${CMAKE_COMMAND} ARGS "-E delete_regv \"${hkey}\"")
  283. exec_program(${CMAKE_COMMAND} ARGS "-E remove \"${dir}/${file}\"")
  284. endif ()
  285. endif ()
  286. #
  287. # Test a set and a remove
  288. #
  289. set(REMOVE_STRING a b c d e f)
  290. set(removeVar1 c e)
  291. remove(REMOVE_STRING ${removeVar1} f)
  292. #
  293. # Test an IF inside a FOREACH.
  294. #
  295. foreach(x "a")
  296. if(${x} MATCHES "a")
  297. # Should always execute.
  298. set(IF_INSIDE_FOREACH_THEN_EXECUTED 1)
  299. else()
  300. # Should never execute.
  301. set(IF_INSIDE_FOREACH_ELSE_EXECUTED 1)
  302. endif()
  303. endforeach()
  304. # test WHILE command
  305. set (while_var 1)
  306. while (while_var LESS 1000)
  307. set(while_var ${while_var}0)
  308. endwhile()
  309. set(SHOULD_BE_ZERO )
  310. set(SHOULD_BE_ONE 1)
  311. set(SHOULD_BE_ZERO_AND_INDENTED )
  312. set(SHOULD_BE_ONE_AND_INDENTED 1)
  313. # test elseif functionality, the mess below tries to catch problem
  314. # of clauses being executed early or late etc
  315. set (RESULT 3)
  316. if (RESULT EQUAL 1)
  317. if (RESULT EQUAL 2)
  318. set (ELSEIF_RESULT 1)
  319. elseif (RESULT EQUAL 3)
  320. set (ELSEIF_RESULT 1)
  321. endif ()
  322. elseif (RESULT EQUAL 2)
  323. set (ELSEIF_RESULT 1)
  324. elseif (RESULT EQUAL 3)
  325. if (RESULT EQUAL 2)
  326. set (ELSEIF_RESULT 1)
  327. elseif (RESULT EQUAL 3)
  328. if (NOT ELSEIF_RESULT EQUAL 1)
  329. set (ELSEIF_RESULT 2)
  330. endif ()
  331. endif ()
  332. elseif (RESULT EQUAL 4)
  333. if (RESULT EQUAL 2)
  334. set (ELSEIF_RESULT 1)
  335. elseif (RESULT EQUAL 3)
  336. set (ELSEIF_RESULT 1)
  337. endif ()
  338. else ()
  339. if (RESULT EQUAL 2)
  340. set (ELSEIF_RESULT 1)
  341. elseif (RESULT EQUAL 3)
  342. set (ELSEIF_RESULT 1)
  343. endif ()
  344. endif ()
  345. if (NOT ELSEIF_RESULT EQUAL 2)
  346. set (ELSEIF_RESULT 0)
  347. endif ()
  348. # test handling of parenthetical groups in conditionals
  349. if (2 GREATER 1 AND (4 LESS 3 OR 5 LESS 6) AND NOT (7 GREATER 8))
  350. set(CONDITIONAL_PARENTHESES 1)
  351. endif()
  352. #
  353. # Configure file
  354. # (plug vars to #define so that they can be tested)
  355. #
  356. configure_file(
  357. ${Complex_SOURCE_DIR}/cmTestConfigure.h.in
  358. ${Complex_BINARY_DIR}/cmTestConfigure.h)
  359. set(STRING_WITH_QUOTES "\"hello world\"")
  360. # test CONFIGURE_FILE with ESCAPE_QUOTES on
  361. configure_file(
  362. ${Complex_SOURCE_DIR}/cmTestConfigureEscape.h.in
  363. ${Complex_BINARY_DIR}/cmTestConfigureEscape.h ESCAPE_QUOTES)
  364. # Test regular expression commands.
  365. string(REGEX MATCH "b" RESULT "abc")
  366. if(NOT RESULT)
  367. message(SEND_ERROR "string(REGEX MATCH ... ) test failed.")
  368. endif()
  369. string(REGEX MATCHALL "b" RESULT "abcb")
  370. if(NOT RESULT)
  371. message(SEND_ERROR "string(REGEX MATCHALL ... ) test failed.")
  372. endif()
  373. string(REGEX REPLACE ".([bd])." "[\\1]" RESULT "a(b)c(d)e")
  374. if(NOT RESULT STREQUAL "a[b]c[d]e")
  375. message(SEND_ERROR
  376. "string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")")
  377. endif()
  378. #
  379. # This tests needs Ansi C++98
  380. #
  381. set(CMAKE_CXX_STANDARD 98)
  382. #
  383. # GNU extensions are needed for stricmp() on Windows.
  384. #
  385. set(CMAKE_CXX_EXTENSIONS TRUE)
  386. # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers
  387. if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND
  388. CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
  389. set(CMAKE_CXX_STANDARD 11)
  390. endif()
  391. #
  392. # Create the libs and the main exe
  393. #
  394. add_subdirectory(Library)
  395. add_subdirectory(Executable)
  396. subdir_depends(Executable Library)
  397. export_library_dependencies(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake)
  398. include(${Complex_BINARY_DIR}/ComplexLibraryDepends.cmake OPTIONAL)