Merge branch 'fix-Fortran-module-in-subdir' into release
This commit is contained in:
commit
cb409699a4
|
@ -813,10 +813,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
|
||||||
{
|
{
|
||||||
cm.SetGlobalGenerator(ggd);
|
cm.SetGlobalGenerator(ggd);
|
||||||
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
cmState::Snapshot snapshot = cm.GetCurrentSnapshot();
|
||||||
snapshot.GetDirectory().SetCurrentBinary
|
snapshot.GetDirectory().SetCurrentBinary(startOutDir);
|
||||||
(cmSystemTools::GetCurrentWorkingDirectory());
|
snapshot.GetDirectory().SetCurrentSource(startDir);
|
||||||
snapshot.GetDirectory().SetCurrentSource
|
|
||||||
(cmSystemTools::GetCurrentWorkingDirectory());
|
|
||||||
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(ggd, snapshot));
|
cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(ggd, snapshot));
|
||||||
cmsys::auto_ptr<cmLocalGenerator> lgd(
|
cmsys::auto_ptr<cmLocalGenerator> lgd(
|
||||||
ggd->CreateLocalGenerator(mf.get()));
|
ggd->CreateLocalGenerator(mf.get()));
|
||||||
|
|
|
@ -223,5 +223,6 @@ if(TEST_MODULE_DEPENDS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(Library)
|
add_subdirectory(Library)
|
||||||
|
add_subdirectory(Subdir)
|
||||||
add_subdirectory(Executable)
|
add_subdirectory(Executable)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -3,6 +3,6 @@ include_directories(${External_BINARY_DIR})
|
||||||
link_directories(${External_BINARY_DIR})
|
link_directories(${External_BINARY_DIR})
|
||||||
|
|
||||||
add_executable(subdir_exe2 main.f90)
|
add_executable(subdir_exe2 main.f90)
|
||||||
target_link_libraries(subdir_exe2 subdir_mods)
|
target_link_libraries(subdir_exe2 subdir_mods subdir_mods2)
|
||||||
add_dependencies(subdir_exe2 ExternalTarget)
|
add_dependencies(subdir_exe2 ExternalTarget)
|
||||||
target_link_libraries(subdir_exe2 myext)
|
target_link_libraries(subdir_exe2 myext)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
PROGRAM MAINF90
|
PROGRAM MAINF90
|
||||||
USE libraryModuleA
|
USE libraryModuleA
|
||||||
USE libraryModuleB
|
USE libraryModuleB
|
||||||
|
USE subdirModuleA
|
||||||
USE externalMod
|
USE externalMod
|
||||||
CALL printExtModGreeting
|
CALL printExtModGreeting
|
||||||
END PROGRAM MAINF90
|
END PROGRAM MAINF90
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
add_library(subdir_mods2 subdir.f90)
|
||||||
|
target_include_directories(subdir_mods2 INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
|
|
@ -0,0 +1,2 @@
|
||||||
|
MODULE subdirModuleA
|
||||||
|
END MODULE
|
Loading…
Reference in New Issue